﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpages/Main.master" AutoEventWireup="true" EnableEventValidation="true"
    CodeFile="ExcelOutputMultiple.aspx.cs" Inherits="User_Shares_ExcelOutputMultiple"%>
    <%@ Register src="../../Controls/ContentHolder/Holder1.ascx" tagname="Holder1" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        
        .DataEnterer
        {
            background-color: #CCCCE7;
            font-weight: bolder;
        }
        
        .styleGrid
        {
            padding: 0px;
            margin: 0px;
        }
    </style>
   <%-- <script src="~/Scripts/SameHeight.js" type="text/javascript">
    </script>
  
    <script type="text/javascript">
        $(function () { $('#equalize').equalHeights(); });
    </script>--%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">





        <asp:Panel ID="Panel1" ScrollBars="Auto" Width="100%" ForeColor="Black" runat="server"
            Direction="RightToLeft" Height="500px"  Font-Names="Tahoma"
            Font-Size="X-Small">
            <asp:GridView ID="GridViewExcelOutput" runat="server"  AutoGenerateColumns="False"
              DataKeyNames="ContractId" BackColor="White" OnRowDataBound="GridViewExcelOutput_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="مشخصات عمومی روستا">
                        <ItemTemplate>
                            <asp:GridView ID="GridViewVillage" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
                                HeaderStyle-Height="75px" HeaderStyle-VerticalAlign="Middle" HeaderStyle-BackColor="#CCCCE7">
                                <Columns>
                                    <asp:TemplateField HeaderText="روستا">
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval( "Contract.VillageName" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="کد آبادی">
                                        <ItemTemplate>
                                            <asp:Label ID="Label2" runat="server" Text='<%# Eval( "Contract.VillageCode" ).ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="400px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="دهستان">
                                        <ItemTemplate>
                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval( "Contract.Dehestan" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="بخش">
                                        <ItemTemplate>
                                            <asp:Label ID="Label4" runat="server" Text='<%# Eval( "Contract.Bakhsh" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="شهرستان">
                                        <ItemTemplate>
                                            <asp:Label ID="Label5" runat="server" Text='<%# Eval( "Contract.City" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="خانوار">
                                        <ItemTemplate>
                                            <asp:Label ID="Label6" runat="server" Text='<%# Eval( "Contract.Khanevar" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="جمعیت">
                                        <ItemTemplate>
                                            <asp:Label ID="Label7" runat="server" Text='<%# Eval( "Contract.Population" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </ItemTemplate>
                        <ItemStyle Width="600px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <ItemTemplate>
                            <asp:Panel ID="PanelAdvisor" runat="server" Height="75" Font-Bold="true" BackColor="#CCCCE7">
                                <div style="height: 100%; width: 100%; background-color: #CCCCE7; vertical-align: middle;
                                    margin: auto;">
                                    <asp:Label ID="Label8" runat="server" Text="مشاور"></asp:Label>
                                </div>
                            </asp:Panel>
                            <asp:Label ID="LabelAdvisorName" runat="server" Text='<%# Eval( "Contract.AdvisorFullName" ) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="مشخصات قرارداد">
                        <ItemTemplate>
                            <asp:GridView ID="GridViewContractInfo" runat="server" AutoGenerateColumns="false"
                                HeaderStyle-Height="75px" HeaderStyle-VerticalAlign="Middle" HeaderStyle-BackColor="#CCCCE7">
                                <Columns>
                                    <asp:TemplateField HeaderText="تاریخ قرارداد">
                                        <ItemTemplate>
                                            <asp:Label ID="LabelContractDate" runat="server" Text='<%# Eval( "Contract.ContractDate" ) %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="شماره قرارداد">
                                        <ItemTemplate>
                                            <asp:Label ID="LabelContractNumber" runat="server" Text='<%# Eval( "Contract.ContractNumber" ).ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle Width="50px" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </ItemTemplate>
                        <ItemStyle Width="100px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="کنترل روند">
                        <ItemTemplate>
                            <div style="float: right; padding: 0px;">
                                <asp:GridView ID="GridViewProjectStatus" runat="server" AutoGenerateColumns="false"
                                EnableViewState="true" EnableModelValidation="false" EnableTheming="true"    HeaderStyle-Height="75px" HeaderStyle-VerticalAlign="Middle"
                                    HeaderStyle-BackColor="#CCCCE7">
                                    <Columns>
                                    </Columns>
                                </asp:GridView>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="" ItemStyle-Width="100">
                        <ItemTemplate>
                            <asp:Panel ID="PanelTiming" runat="server" BackColor="#CCCCE7" Height="75" Font-Bold="true"
                                HorizontalAlign="Center">
                                <div style="height: 100%; width:100%; background-color: #CCCCE7; vertical-align: middle; margin: auto;">
                                    <asp:Label ID="Label14" runat="server" Text="برنامه زمانبندی"></asp:Label>
                                </div>
                            </asp:Panel>
                            <div style="float: right; width: 150px; padding: 0px;">
                                <div>
                                    <asp:Label ID="LabelFourthFactor" runat="server" Text="" Font-Bold="true"></asp:Label><br />
                                    <asp:Label ID="LabelAdvisor" runat="server" Text="" Font-Bold="true"></asp:Label>
                                </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#3366FF" Font-Bold="True" />
                <RowStyle BorderStyle="Solid" BorderWidth="2px" CssClass="OptionalTables" />
            </asp:GridView>
        </asp:Panel>
    
 
    <table class="style1">
        <tr>
            <td>
                <%-- <input id="Button1" title="Print" type="button" onclick="CallPrint('divPrint');" value="Print" />--%>
                <%--<asp:Button ID="btnPrint" runat="Server" Font-Names="Tahoma" 
                    onclick="btnPrint_Click" Text="پرینت" Width="56px" />--%>
            </td>
            <td>
                <asp:Button ID="ExportToExcel0" runat="server" Text="ذخیره در فایل Excel" Font-Names="Tahoma"
                    Height="33px" OnClick="ExportToExcel_Click" Width="250px" />
                &nbsp;
            </td>
            <td>
                <asp:Button ID="ExportToWord" runat="server" Text="ذخیره در فایل Word" Font-Names="Tahoma"
                    Height="33px" OnClick="ExportToWord_Click" Width="250px" />
                &nbsp;
            </td>
        </tr>
    </table>

</asp:Content>
